package com.zhy.generator.codegen.internal.tableattribute;

import com.zhy.generator.codegen.api.IntrospectedTable;

import java.util.Map;

public class IntrospectedTableAttributes {

    private Map<InternalAttribute, String> internalAttributes;

    private XmlAttributes xmlAttributes;
    private JavaAttributes javaAttributes;

    public IntrospectedTableAttributes(IntrospectedTable introspectedTable){
        xmlAttributes = new XmlAttributes(introspectedTable);
        javaAttributes = new JavaAttributes(introspectedTable);
    }

    public void initialize(){
        javaAttributes.calculateMapperAttributes();
        javaAttributes.calculateModelAttributes();
        javaAttributes.calculateVoAttributes();
        javaAttributes.calculateServiceAttributes();
        javaAttributes.calculateRequestAttributes();
        javaAttributes.calculateHelperAttributes();
        javaAttributes.calculateControllerAttributes();
        javaAttributes.calculateConstantAttributes();
        xmlAttributes.calculateXmlAttributes();
    }
}
